<form [formGroup]='myForm' >
    <div class="form-group">
      <label for="name">用户名</label>
      <input type="text" class="form-control" id="name" name="name" formControlName="name">
    </div>
    <div class="form-group">
      <label for="password">密码</label>
      <input type="text" class="form-control" id="password" name="password" formControlName="password">
    </div>
    <div class="form-group">
      <label for="newpassword">新密码</label>
      <input type="text" class="form-control" id="newpassword" name="newpassword" formControlName="newpassword">
    </div>
</form>
<div class="d-flex justify-content-center">
  <button type="button" class="btn btn-primary" (click)="look()">查询</button>
  <button type="button" class="btn btn-secondary" (click)="add()">添加</button>
  <button type="button" class="btn btn-success" (click)="updata()">修改</button>
  <button type="button" class="btn btn-danger" (click)="delete()">删除</button>
</div>
<table class="table">
    <thead>
      <tr>
        <th scope="col">#</th>
        <th scope="col">学号</th>
        <th scope="col">用户名</th>
        <th scope="col">密码</th>
      </tr>
    </thead>
    <tbody>
      <tr *ngFor='let user of users$; let i = index'>
        <th scope="row">{{i}}</th>
        <td>{{user.id}}</td>
        <td>{{user.name}}</td>
        <td>{{user.password}}</td>
      </tr>
    </tbody>
</table>